<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/12/22
 * Time: 17:59
 */

class Customer_model extends CI_Model
{
    public function user_id($web_user_id, $web_id)
    {
        $this->db->from('customer');
        $this->db->where('web_user_id', $web_user_id);
        $this->db->where('web_id', $web_id);

        $query = $this->db->get();
        $order_info = $query->row_array();
        return $order_info['user_id'];
    }

    public function insert_user($user)
    {
        $query = $this->db->insert('customer', $user);
        return $this->db->insert_id();
    }
}